package entity;

import org.hibernate.annotations.*;
import org.hibernate.annotations.Cache;

import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by xuweijie on 17-5-14.
 */
@Entity
@Table(name = "cro_propaganda")
@DynamicInsert(true)
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class CroPropaganda implements Serializable {
    private String id;
    private String propagandaname;
    private String url;
    private String type;
    private String photo;
    private Date createtime;
    private String del_flag;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPropagandaname() {
        return propagandaname;
    }

    public void setPropagandaname(String propagandaname) {
        this.propagandaname = propagandaname;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Column(columnDefinition ="varchar(10) default '0'")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @CreationTimestamp
    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Column(columnDefinition ="varchar(1) default '0'")
    public String getDel_flag() {
        return del_flag;
    }

    public void setDel_flag(String del_flag) {
        this.del_flag = del_flag;
    }
}
